package vista;

import javax.swing.JPanel;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.JComboBox;
import javax.swing.JButton;
import java.awt.Color;
import java.awt.Font;
import javax.swing.BorderFactory;
import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;
import java.awt.GridBagLayout;
import java.awt.GridBagConstraints;
import controlador.ControladorListados;



/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
@SuppressWarnings("serial")
public class VistaListados extends JFrame {

	private JPanel jContentPane = null;
	private JPanel jPanel = null;
	private JPanel jPanel1 = null;
	private JLabel jLabel = null;
	private JTextField jTextField = null;
	private JPanel jPanel2 = null;
	private JLabel jLabel1 = null;
	private JTextField jTextField1 = null;
	private JLabel jLabel2 = null;
	private JTextField jTextField2 = null;
	private JLabel jLabel3 = null;
	private JTextField jTextField3 = null;
	private JLabel jLabel4 = null;
	private JTextField jTextField4 = null;
	private JLabel jLabel5 = null;
	private JTextField jTextField5 = null;
	private JLabel jLabel6 = null;
	private JTextField jTextField6 = null;
	private JLabel jLabel12;
	private JComboBox txtSentido;
	private JComboBox txtlistados;
	private JLabel jLabel7 = null;
	private JLabel jLabel8 = null;
	private JLabel jLabel9 = null;
	private JPanel jPanel3 = null;
	private JPanel jPanel4 = null;
	private JPanel jPanel5 = null;
	private JLabel jLabel11 = null;
	private JButton btnBuscar = null;
	private JPanel jPanel6 = null;
	private JLabel jLabel10 = null;
	/**
	 * This method initializes jPanel	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getJPanel() {
		if (jPanel == null) {
			jPanel = new JPanel();
			jPanel.setLayout(null);
			jPanel.setBackground(new java.awt.Color(0,102,102));
			jPanel.setBounds(new java.awt.Rectangle(0,0,708,1));
			jPanel.add(getJPanel1(), null);
		}
		return jPanel;
	}

	/**
	 * This method initializes jPanel1	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getJPanel1() {
		if (jPanel1 == null) {
			jLabel = new JLabel();
			jLabel.setBounds(new java.awt.Rectangle(38,320,76,19));
			jLabel.setText("ID Empleado");
			jPanel1 = new JPanel();
			jPanel1.setLayout(null);
			jPanel1.setBounds(new java.awt.Rectangle(16,13,637,316));
			jPanel1.setBackground(java.awt.Color.white);
			jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createTitledBorder(null, "", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null), "", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));
			jPanel1.add(jLabel, null);
			jPanel1.add(getJTextField(), null);
			jPanel1.add(getJPanel2(), null);
		}
		return jPanel1;
	}

	/**
	 * This method initializes jTextField	
	 * 	
	 * @return javax.swing.JTextField	
	 */
	private JTextField getJTextField() {
		if (jTextField == null) {
			jTextField = new JTextField();
			jTextField.setBounds(new java.awt.Rectangle(120,316,105,19));
		}
		return jTextField;
	}

	/**
	 * This method initializes jPanel2	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getJPanel2() {
		if (jPanel2 == null) {
			jLabel9 = new JLabel();
			jLabel9.setBounds(new java.awt.Rectangle(24,254,59,16));
			jLabel9.setText("Telefono 2");
			jLabel8 = new JLabel();
			jLabel8.setBounds(new java.awt.Rectangle(24,229,59,16));
			jLabel8.setText("Telefono 2");
			jLabel7 = new JLabel();
			jLabel7.setBounds(new java.awt.Rectangle(22,202,59,16));
			jLabel7.setText("Telefono 2");
			jLabel6 = new JLabel();
			jLabel6.setBounds(new java.awt.Rectangle(22,174,59,16));
			jLabel6.setText("Telefono 2");
			jLabel5 = new JLabel();
			jLabel5.setBounds(new java.awt.Rectangle(20,149,59,16));
			jLabel5.setText("Telefono 1");
			jLabel4 = new JLabel();
			jLabel4.setBounds(new java.awt.Rectangle(21,123,45,16));
			jLabel4.setText("Nombre");
			jLabel3 = new JLabel();
			jLabel3.setBounds(new java.awt.Rectangle(21,97,45,16));
			jLabel3.setText("Apellido");
			jLabel2 = new JLabel();
			jLabel2.setBounds(new java.awt.Rectangle(22,70,45,16));
			jLabel2.setText("Nombre");
			jLabel1 = new JLabel();
			jLabel1.setBounds(new java.awt.Rectangle(22,41,39,16));
			jLabel1.setText("Cedula");
			jPanel2 = new JPanel();
			jPanel2.setLayout(null);
			jPanel2.setBounds(new java.awt.Rectangle(24,12,620,298));
			jPanel2.setBackground(java.awt.Color.white);
			jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createTitledBorder(null, "", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null), "Datos personales", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));
			jPanel2.add(jLabel1, null);
			jPanel2.add(getJTextField1(), null);
			jPanel2.add(jLabel2, null);
			jPanel2.add(getJTextField2(), null);
			jPanel2.add(jLabel3, null);
			jPanel2.add(getJTextField3(), null);
			jPanel2.add(jLabel4, null);
			jPanel2.add(getJTextField4(), null);
			jPanel2.add(jLabel5, null);
			jPanel2.add(getJTextField5(), null);
			jPanel2.add(jLabel6, null);
			jPanel2.add(getJTextField6(), null);
			jPanel2.add(jLabel7, null);
			jPanel2.add(jLabel8, null);
			jPanel2.add(jLabel9, null);
		}
		return jPanel2;
	}

	/**
	 * This method initializes jTextField1	
	 * 	
	 * @return javax.swing.JTextField	
	 */
	private JTextField getJTextField1() {
		if (jTextField1 == null) {
			jTextField1 = new JTextField();
			jTextField1.setBounds(new java.awt.Rectangle(97,39,108,20));
		}
		return jTextField1;
	}

	/**
	 * This method initializes jTextField2	
	 * 	
	 * @return javax.swing.JTextField	
	 */
	private JTextField getJTextField2() {
		if (jTextField2 == null) {
			jTextField2 = new JTextField();
			jTextField2.setBounds(new java.awt.Rectangle(96,67,212,20));
		}
		return jTextField2;
	}

	/**
	 * This method initializes jTextField3	
	 * 	
	 * @return javax.swing.JTextField	
	 */
	private JTextField getJTextField3() {
		if (jTextField3 == null) {
			jTextField3 = new JTextField();
			jTextField3.setBounds(new java.awt.Rectangle(97,96,211,20));
		}
		return jTextField3;
	}

	/**
	 * This method initializes jTextField4	
	 * 	
	 * @return javax.swing.JTextField	
	 */
	private JTextField getJTextField4() {
		if (jTextField4 == null) {
			jTextField4 = new JTextField();
			jTextField4.setBounds(new java.awt.Rectangle(97,126,210,20));
		}
		return jTextField4;
	}

	/**
	 * This method initializes jTextField5	
	 * 	
	 * @return javax.swing.JTextField	
	 */
	private JTextField getJTextField5() {
		if (jTextField5 == null) {
			jTextField5 = new JTextField();
			jTextField5.setBounds(new java.awt.Rectangle(97,156,210,20));
		}
		return jTextField5;
	}

	/**
	 * This method initializes jTextField6	
	 * 	
	 * @return javax.swing.JTextField	
	 */
	private JTextField getJTextField6() {
		if (jTextField6 == null) {
			jTextField6 = new JTextField();
			jTextField6.setBounds(new java.awt.Rectangle(98,187,208,20));
		}
		return jTextField6;
	}

	/**
	 * This method initializes jPanel3	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getJPanel3() {
		if (jPanel3 == null) {
			jPanel3 = new JPanel();
			jPanel3.setLayout(null);
			jPanel3.setBounds(-1, 1, 570, 189);
			jPanel3.setBackground(new java.awt.Color(255,255,255));
			jPanel3.add(getJPanel4(), null);
			jPanel3.add(getJPanel6(), null);
		}
		return jPanel3;
	}

	/**
	 * This method initializes jPanel4	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getJPanel4() {
		if (jPanel4 == null) {
			jPanel4 = new JPanel();
			jPanel4.setLayout(null);
			jPanel4.setBounds(11, 52, 547, 126);
			jPanel4.setBackground(new java.awt.Color(49,120,189));
			jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createTitledBorder(null, "", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Dialog", java.awt.Font.BOLD, 12), java.awt.Color.black), " ", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Dialog", java.awt.Font.BOLD, 12), java.awt.Color.black));
			jPanel4.add(getJPanel5(), null);
		}
		return jPanel4;
	}

	/**
	 * This method initializes jPanel5	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getJPanel5() {
		if (jPanel5 == null) {
			jLabel11 = new JLabel();
			jLabel11.setBounds(56, 26, 102, 16);
			jLabel11.setFont(new java.awt.Font("Bookman Old Style", java.awt.Font.BOLD, 12));
			jLabel11.setText("SELECCIONE");
			jPanel5 = new JPanel();
			jPanel5.setLayout(null);
			jPanel5.setBounds(14, 17, 523, 95);
			jPanel5.setBackground(new java.awt.Color(255,255,255));
			jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createTitledBorder(null, "", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Dialog", java.awt.Font.BOLD, 12), new java.awt.Color(51,51,51)), ".", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Dialog", java.awt.Font.BOLD, 12), new java.awt.Color(51,51,51)));
			jPanel5.add(jLabel11, null);
			jPanel5.add(getBtnBuscar(), null);
			jPanel5.add(getTxtlistados());
			jPanel5.add(getTxtSentido());
			jPanel5.add(getJLabel12());
		}
		return jPanel5;
	}

	/**
	 * This method initializes jButton	
	 * 	
	 * @return javax.swing.JButton	
	 */
	public JButton getBtnBuscar() {
		if (btnBuscar == null) {
			btnBuscar = new JButton();
			btnBuscar.setText("Buscar");
			//btnBuscar.setIcon(new ImageIcon(getClass().getResource("/imagenes/btn_Buscar.png")));
			btnBuscar.setLocation(new java.awt.Point(165,20));
			btnBuscar.setBounds(424, 22, 75, 27);
			btnBuscar.setBackground(new java.awt.Color(255,255,255));
		}
		return btnBuscar;
	}

	private JPanel getJPanel6() {
		if (jPanel6 == null) {
			GridBagConstraints gridBagConstraints = new GridBagConstraints();
			gridBagConstraints.insets = new java.awt.Insets(6,96,13,126);
			gridBagConstraints.gridy = 0;
			gridBagConstraints.ipadx = 2;
			gridBagConstraints.ipady = -6;
			gridBagConstraints.gridx = 0;
			jLabel10 = new JLabel();
			jLabel10.setFont(new Font("Candara", Font.BOLD | Font.ITALIC, 18));
			jLabel10.setForeground(Color.white);
			jLabel10.setText("LISTADOS DISPONIBLES");
			jLabel10.setBackground(new Color(0, 153, 153));
			jPanel6 = new JPanel();
			jPanel6.setLayout(new GridBagLayout());
			jPanel6.setBounds(-2, -2, 572, 45);
			jPanel6.setBackground(Color.black);
			jPanel6.setBorder(BorderFactory.createLineBorder(Color.black, 5));
			jPanel6.add(jLabel10, gridBagConstraints);
		}
		return jPanel6;
	}

	public VistaListados() {
		super();
		initialize();
		registrarControlador();
	}


	@SuppressWarnings("deprecation")
	private void initialize() {
		this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		this.setSize(585, 229);
		this.setContentPane(getJContentPane());
		this.setTitle("Categorias <<La Guapa>>");
		this.show();
		this.setLocationRelativeTo(null);
		this.setVisible(true);
	}


	private JPanel getJContentPane() {
		if (jContentPane == null) {
			jContentPane = new JPanel();
			jContentPane.setLayout(null);
			jContentPane.setPreferredSize(new java.awt.Dimension(571, 202));
			jContentPane.add(getJPanel(), null);
			jContentPane.add(getJPanel3(), null);
		}
		return jContentPane;
	}
	
	
	
	public JComboBox getTxtlistados() {
		if(txtlistados == null) {
			ComboBoxModel txtlistadosModel = 
				new DefaultComboBoxModel(
						new String[] { "Ventas", "Stock de Ingredientes","Ingredientes mas Usados" });
			txtlistados = new JComboBox();
			txtlistados.setModel(txtlistadosModel);
			txtlistados.setBounds(163, 23, 223, 23);
		}
		return txtlistados;
	}
	
	public JComboBox getTxtSentido() {
		if(txtSentido == null) {
			ComboBoxModel txtSentidoModel = 
				new DefaultComboBoxModel(
						new String[] { "Ascendente", "Descendente" });
			txtSentido = new JComboBox();
			txtSentido.setModel(txtSentidoModel);
			txtSentido.setBounds(163, 52, 223, 23);
			
		}
		return txtSentido;
	}
	
	private JLabel getJLabel12() {
		if(jLabel12 == null) {
			jLabel12 = new JLabel();
			jLabel12.setText("ORDEN");
			jLabel12.setFont(new java.awt.Font("Bookman Old Style",java.awt.Font.BOLD,12));
			jLabel12.setBounds(56, 55, 96, 16);
		}
		return jLabel12;
	}
	
	public void registrarControlador(){
		
		ControladorListados controladorlistados = new ControladorListados(this);
		btnBuscar.addActionListener(controladorlistados);
		
	}

}  //  @jve:decl-index=0:visual-constraint="10,10"
